package com.xmkj.bearuser;

import android.content.Context;

import com.common.retrofit.bean.ConsumeBean;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/7/13
 * 描述：
 */

public class ConsumeAdapter extends CommonAdapter<ConsumeBean> {

    public ConsumeAdapter(Context context, List<ConsumeBean> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, ConsumeBean item, int position) {
        holder.setText(R.id.tv_time, item.pay_date);
        holder.setText(R.id.tv_shop_name, item.shop_name);
        holder.setText(R.id.tv_price, item.money
        );
        holder.setText(R.id.tv_order_sn, item.order_sn);
    }

    @Override
    protected int getItemViewLayoutId(int position, ConsumeBean item) {
        return R.layout.item_constum;
    }
}
